Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unsafe transmute of should_interrupt #1154

Closed
wants to merge 1 commit into from

Conversation

maurer
Copy link
Contributor

@maurer maurer commented Dec 6, 2023

Adds a lifetime to the ExtendedBufRead trait to specify how long the callback provided must live.

cc @Manishearth

@maurer maurer force-pushed the remove-unsafe branch 3 times, most recently from 6c42a50 to b713bed Compare December 6, 2023 02:09
Adds a lifetime to the ExtendedBufRead trait to specify how long the
callback provided must live.
Copy link
Contributor

@martinvonz martinvonz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Thanks!

Copy link
Member

@Byron Byron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks so much!

The description of the transmute already makes clear how I struggled to make this work, and for some reason adding a lifetime is nothing I managed to do.

It's also great to see that I was awfully wrong thinking that this cannot currently be expressed, and that ultimately the solution was quite simple and definitely for the better.

@Byron
Copy link
Member

Byron commented Dec 6, 2023

Closing, as this was merged with the commit rewritten as 88f8b34 , I needed the commit message to declare that this is a breaking change.

@Byron Byron closed this Dec 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants